package club.pchome.service;

import club.pchome.common.util.PageUtil;
import club.pchome.dao.TOrderDao;
import club.pchome.model.TOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class TOrderService extends BaseService{


    @Autowired
    TOrderDao tOrderDao;

    public PageUtil<TOrder> orderList(PageUtil<TOrder> pu, Map<String, Object> map) {
        pu.pageUtilHandle(tOrderDao.orderListCount(map));
        map.put("startRow", pu.getStartRow());
        map.put("pageSize", pu.getPageSize());
        pu.setDataList(tOrderDao.orderList(map));
        return pu;
    }

    public int todaySuccessOrder(){
        return tOrderDao.todaySuccessOrder();
    }
}
